-
Notifications
You must be signed in to change notification settings - Fork 82
Fix coverage with new vitest setup #377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #377 +/- ##
===========================================
- Coverage 99.54% 87.21% -12.34%
===========================================
Files 8 48 +40
Lines 222 3276 +3054
Branches 10 593 +583
===========================================
+ Hits 221 2857 +2636
- Misses 1 329 +328
- Partials 0 90 +90 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes the vitest configuration to properly support code coverage collection across the monorepo packages. The main issue being addressed is that the previous root: './test' setting was causing incorrect path resolution for both test discovery and coverage reporting.
Key Changes:
- Removed
root: './test'from all package vitest configs and updated paths accordingly - Added explicit
coverage.includepatterns to ensure only source files insrc/are measured for coverage - Fixed import path in cashscript's vitest.setup.ts from relative-to-test-dir to relative-to-package-root
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/utils/vitest.config.ts | Removed root setting, updated test include pattern to test/**/*, added coverage include pattern, removed coverage reporter config |
| packages/cashscript/vitest.setup.ts | Fixed TestExtensions import path from '../src/test/...' to './src/test/...' to work with new root setting |
| packages/cashscript/vitest.config.ts | Removed root setting, updated test include pattern to test/**/*, added coverage include pattern, reordered config fields |
| packages/cashc/vitest.config.ts | Removed root setting, updated test include pattern to test/**/*, added coverage include and exclude patterns for generated grammar files, reordered config fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.